<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>问题编辑</title>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="/ueditor/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript">
	$(function(){
		var ue = UE.getEditor("KSP_CON",{
			toolbars: [[
			              'fullscreen', 'source', '|', 'undo', 'redo', '|',
			              'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
			              'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
			              'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
			              'directionalityltr', 'directionalityrtl', 'indent', '|',
			              'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
			              'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
			              'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
			              'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
			              'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
			              'print', 'preview', 'searchreplace', 'help', 'drafts'
			          ]],
			serverUrl:"/uedi"
		});
		
		
		var cootkn = $.cookie("COO_TKN");
		var rdata ={"COO_TKN" : cootkn};
		
		$.ajax({
			url:"/usr/KSPU02",
			type:"GET",
			dataType:"json",
			data:rdata,
			success:function(data) {
				if(data.cod == "200") {
					var usr = JSON.parse(data.jdt);
					$("#sUsr").text(usr[0].USR_NAM);
				}else {
					alert(data.msg);
				}
			}
			
		});
		
		$("#tijiao").bind("click",function() {
			var req = $("#formTskAdd").serialize();
			var cont = UE.getEditor('KSP_CON').getContent();
			var quaunm = $("#sUsr").text();
			
			var reqsub = $.param({"KSP_KSP_CON":cont, "KSP_QUA_UNM":quaunm, "KSP_COO_TKN": cootkn});
			req += "&" + reqsub;
			$.ajax({
				url:"/tsk/KSPT01",
				type:"POST",
				dataType:"json",
				data:req,
				success:function(data){
					if (data.cod == "200") {
						alert("添加成功");
						window.location.href="/p/tsk/tsklst";
					} else {
						alert(data.msg);
					}
				}
			});
		});
		
		
	})

</script>

</head>
<body>
	<div style="margin-left: 200px;">
		<div>问题编辑|<span id="sUsr"></span></div>
		<div>
			<form id="formTskAdd">
				<table>
					<tr>
						<td>问题主题 <input type="text" name="KSP_KSP_TTL" value="问题主题"></td>
					</tr>
				<!-- 	<tr>
						<td>问题详细说明 <input type="text" name="KSP_KSP_CON"
							value=">问题详细说明"></td>
					</tr> -->
					<tr>
						<td>问题重要级别 <input type="text" name="KSP_IMP_DEG" value="0"></td>
					</tr>
					<tr>
						<td>问题处理人员 <input type="text" name="KSP_DEA_USR"
							value="80244299"></td>
					</tr>
					<tr>
						<td>问题处理人员姓名 <input type="text" name="KSP_DEA_UNM"
							value="一片片"></td>
					</tr>
					<tr>
						<td>问题处理状态 <input type="text" name="KSP_TSK_STS" value="W"></td>
					</tr>
					<tr>
						<td>问题类别 <input type="text" name="KSP_TSK_TYP" value="1"></td>
					</tr>
					<!-- <tr>
						<td>问题反馈人员 <input type="text" name="KSP_QUA_USR"
							value="100000000"></td>
					</tr>
					<tr>
						<td>问题反馈人员姓名 <input type="text" name="KSP_QUA_UNM"
							value="李龙飞"></td>
					</tr> -->
					<tr>
						<td>备注信息 <input type="text" name="KSP_SPC_RMK" value="我"></td>
					</tr>
				</table>
			</form>
			<div>
				<textarea id="KSP_CON" style="width:800px;height:300px;"></textarea>
			</div>
			
		</div>
		<button id="tijiao" name="tijiao"
			sytle="margin-left:250px; width:60px; position:relative">提交</button>
	</div>

</body>
</html>